package cn.bonoon.entities.plugins;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import cn.bonoon.kernel.support.entities.AbstractPersistable;

/**
 * 公告信息
 * 
 * @author jackson
 * 
 */
@Entity
@Table(name = "T_ANNOUNCEMENT")
public class AnnouncementEntity extends AbstractPersistable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7263730958556062396L;

	@Column(name = "C_CONTENT", length = 2048)
	private String content;

	/**
	 * <pre>
	 * 公告的类型：
	 * 0-外部公告（不需要登录都可以查看）
	 * 1-内部公告（只有登录系统才能查看）
	 * 2...n - 由子系统自行定义
	 * </pre>
	 */
	@Column(name = "C_TYPE")
	private int type;
	/**
	 * 该公告属于哪个系统
	 */
	@Column(name = "C_KEY")
	private String key;
	@Column(name = "C_CREATORID")
	private Long creatorId;
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "C_CREATEAT", nullable = false)
	private Date createAt;
	@Column(name = "C_CREATORNAME")
	private String creatorName;

	@Column(name = "C_OWNERID")
	private long ownerId;

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public Long getCreatorId() {
		return creatorId;
	}

	public void setCreatorId(Long creatorId) {
		this.creatorId = creatorId;
	}

	public Date getCreateAt() {
		return createAt;
	}

	public void setCreateAt(Date createAt) {
		this.createAt = createAt;
	}

	public String getCreatorName() {
		return creatorName;
	}

	public void setCreatorName(String creatorName) {
		this.creatorName = creatorName;
	}

	public long getOwnerId() {
		return ownerId;
	}

	public void setOwnerId(long ownerId) {
		this.ownerId = ownerId;
	}

}
